﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Vortex.Drawing {
	/// <summary>
	/// Allows make brush from any existing sprite
	/// </summary>
	public class SpriteBrush : CanvasBrush {

		/// <summary>
		/// Initializes a new instance of the <see cref="SpriteBrush"/> class from existing sprite.
		/// </summary>
		/// <param name="sprite">The sprite instance.</param>
		public SpriteBrush(Sprite sprite) {
			if (null == sprite) throw new ArgumentNullException("sprite");

			_patternTexture = sprite.Texture;
			_region = sprite.Region;
			_transformedRegion = sprite.TransformedRegion;
		}
	}
}
